﻿using Ledict.ConditionExtract.BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ledict.ConditionExtract.Frm
{
    /// <summary>
    /// 生成CCID
    /// </summary>
    public partial class CreateCCIDcs : Form
    {
        public CreateCCIDcs()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 生成CCID
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCreateCCID_Click(object sender, EventArgs e)
        {
            int result;
            rtbCCIDs.Text = string.Empty;
            if (!string.IsNullOrEmpty(txbCreateNum.Text.Trim())&&int.TryParse(txbCreateNum.Text.Trim(),out result))
            {
                StringBuilder sb = new StringBuilder();
                NewIDBLL createBll = new NewIDBLL();
                for (int i = 0; i < result; i++)
                {
                    sb.AppendLine(createBll.JudgeDoc_CreateID("SYS_CaseCause"));
                }
                rtbCCIDs.Text = sb.ToString();
            }
            else
            {
                MessageBox.Show("请先填写数量！");
                txbCreateNum.Focus();
                return;
            }
        }
    }
}
